<?php if (isset($msg_info)) : ?>
	<script type="text/javascript" language="JavaScript">
		$(document).ready(function() {
			$("#msg_info").animate({opacity: 1.0}, 3000).fadeOut();
		});
	</script>
<?php endif; ?>
<?php if (isset($msg_error)) : ?>
	<script type="text/javascript" language="JavaScript">
		$(document).ready(function() {
			$("#msg_error").animate({opacity: 1.0}, 3000).fadeOut();
		});
	</script>
<?php endif; ?>
<?php if (isset($extraHead)) echo $extraHead; ?>
</head>
<body <?php if (isset($extraBody)) echo $extraBody; ?>>
<div id="stretch"><div id="wrapper">
<div id="container">
<div id="header">
	<a href="<?=site_url()?>" class="home"><img src="<?=site_url()?>img/home.jpg" alt="home" /></a>
	<ul class="nav-list">
		<li><?=anchor('xa/about', 'about');?></li>
		<li><?=anchor('calendar', 'calendar');?></li>
		<li><?=anchor('xa/resources', 'resources');?></li>
		<li><?=anchor('xa/contact', 'contact');?></li>
		<li class="last"><?php if (isset($loggedin)) { echo anchor('site/logout','logout'); } else { echo anchor('site/login','login'); } ?></li>
	</ul>
	<?php if (isset($admin_nav)): ?>
		<?php $this->load->view('admin/admin_nav'); ?>
	<?php elseif (isset($loggedin)): ?>
		<?php $this->load->view('site_nav'); ?>
	<?php endif; ?>
</div>
<?php if (isset($pagetype)): ?>
<div id="<?=$pagetype?>">
<?php else: ?>
<div id="page">
<?php endif; ?>
	<?php if (isset($msg_info)) : ?>
		<div id="msg_info" class="info"><?=$msg_info?></div>
	<?php endif; ?>
	<?php if (isset($msg_error)) : ?>
		<div id="msg_error" class="error"><?=$msg_error?></div>
	<?php endif; ?>
	<?php if (isset($sidebar)): ?>
		<?php $this->load->view('sidebar'); ?>
	<?php endif; ?>